<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>Hello,百度地图！</title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  <style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
#l-map{height:100%;width:78%;float:left;border-right:2px solid #bcbcbc;}
#r-result{height:100%;width:20%;float:left;}
  </style>
  <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
 </head>

 <body>
  <div id="allmap"></div>
 </body>
</html>
<script type="text/javascript">
var map = new BMap.Map("allmap");            // 创建Map实例
map.centerAndZoom('大连', 8);                     // 初始化地图,设置中心点坐标和地图级别。
map.enableScrollWheelZoom();                            //启用滚轮放大缩小
map.addControl(new BMap.NavigationControl());
alert('当前地图的缩放级别：' + map.getZoom());
</script>